<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.xteam.ecsystem.utils.AppConfig"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

// 获取购物券图片路径
String couponImgPath = AppConfig.getCouponImagePath();
// 获取图片实际根目录
String realpath = AppConfig.getRealPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>购物券管理-购物券列表</title>
    <jsp:include page="../../include/base.jsp"></jsp:include>
	<jsp:include page="../../include/common.jsp"></jsp:include>
	<jsp:include page="../../include/baseManage.jsp"></jsp:include>
	
	<script type="text/javascript">
			var __couponImgPath = "<%=couponImgPath %>";
			var __realpath = '<%=realpath%>';
	</script>
  </head>
  <body>   
  	<div class="mini-toolbar" style="border:0;font-size:12px;padding-left:6px;"> 
        <!-- 操作面板 -->
        <div class="operatePanel">
	       	<input class="mini-button" text="添加购物券" iconCls="icon-addnew" plain="false" 
	       		onclick="CouponHandler.addCoupon" visible="false" id="coupon_list_add"/>
	       	<input class="mini-button" text="编辑购物券" iconCls="icon-edit" plain="false" 
	       		onclick="CouponHandler.editCoupon" visible="false" id="coupon_list_edit"/>
	       	<input class="mini-button" text="删除购物券" iconCls="icon-remove" plain="false" 
	       		onclick="CouponHandler.delCoupon" visible="false" id="coupon_list_del"/>
	       	<input class="mini-button" text="展开查询" iconCls="icon-btn-expand" plain="false" 
		       	onclick="CouponHandler.queryCoupon" visible="false" id="coupon_list_query"/>
	       	<input class="mini-button" text="刷新" iconCls="icon-btn-refresh" plain="false" 
	       		onclick="CouponHandler.afresh" visible="false" id="coupon_list_refresh"/>
	    </div>
	    <!-- 查询面板 -->
	    <div id="queryCouponDiv" class="queryPanel">
	    	<label class="queryPanelLbl">购物券名称：</label>
	    	<input class="mini-textbox" id="query_bciName"/>
	    	<label class="queryPanelLbl">购物券状态：</label>
	    	<input class="mini-combobox" id="query_bciState" textField="text" valueField="id"/>
	    	<input class="mini-button" text="查询" iconCls="icon-btn-search" plain="false" 
	    		onclick="CouponHandler.doQueryCoupon"/>
	    </div>
    </div>
    <div class="mini-fit" id="couponPanel">
	    <div id="couponGrid" class="mini-datagrid" fitColumns="true" style="width:100%;height:100%;" 
	    	multiSelect="true" pageSize="20" borderStyle="border-bottom:0;border-left:0;border-right:0;"
	    	virtualScroll="true" idField="bciId" url="<%=path %>/getCouponList.do">
	        <div property="columns">
	        	<div type="checkcolumn" ></div>
	            <div type="indexcolumn" width="40" headerAlign="center">序号</div>
	            <div field="bciName" name="bciName" width="300" headerAlign="center">购物券名称</div>    
	            <div field="bciPrice" name="bciPrice" width="100" headerAlign="center">面值金额（元）</div>
	            <div field="bciPicurl" name="bciPicurl" width="100%" headerAlign="center">购物券图片</div>
	            <div field="bciState" name="bciState" width="100" headerAlign="center" align="center">购物券状态</div>
	        </div>
	    </div>
    </div>
  </body>
  <script src="handler/CouponHandler.js" type="text/javascript"></script>
</html>
